/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80017
 Source Host           : localhost:3306
 Source Schema         : cloud_ddos

 Target Server Type    : MySQL
 Target Server Version : 80017
 File Encoding         : 65001

 Date: 02/11/2020 09:34:59
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for uac_dictionary
-- ----------------------------
DROP TABLE IF EXISTS `uac_dictionary`;
CREATE TABLE `uac_dictionary` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `classification` varchar(32) NOT NULL COMMENT '类别',
  `target` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '属性名',
  `value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '属性值',
  `parent_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '父级id',
  `create_time` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
  `update_time` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `account_id` bigint(20) DEFAULT NULL COMMENT '用户id，如果有值代表该用户独有',
  `tenant_id` bigint(20) NULL COMMENT '租户id',
  `tenant_name` varchar(64) NULL COMMENT '租户名字',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=139 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='字典表';

-- ----------------------------
-- Records of uac_dictionary
-- ----------------------------
BEGIN;
INSERT INTO `uac_dictionary` VALUES (137, 'SEX', '男', '1',0,'2020-09-23 18:02:19', '2020-09-23 18:02:22', 0, NULL, 100, '288口岸');
INSERT INTO `uac_dictionary` VALUES (138, 'SEX', '女', '0',0,'2020-09-23 18:02:19', '2020-09-23 18:02:22', 0, NULL, 100, '288口岸');
COMMIT;

-- ----------------------------
-- Table structure for uac_account
-- ----------------------------
DROP TABLE IF EXISTS `uac_account`;
CREATE TABLE `uac_account` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(61) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '账号',
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '密码',
  `nickname` varchar(62) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '昵称',
  `enable` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否启用',
  `role` varchar(61) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色code',
  `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '邮箱',
  `create_time` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
  `update_time` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) COMMENT '更新时间',
  `deleted` tinyint(255) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `email_authentication` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否邮箱验证',
  `tenant_id` bigint(20) NULL COMMENT '租户id',
  `tenant_name` varchar(64) NULL COMMENT '租户名字',
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_index_username` (`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1302603974434476035 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户表';

-- ----------------------------
-- Records of uac_account
-- ----------------------------
BEGIN;
INSERT INTO `uac_account` VALUES (19000, 'jojo', '$2a$10$svCLt8f2BLtwkZA.e3q6/OvjjYcikqUCCyvF0bhbuve3EdOlrgyby', 'jojo', 1, 'SUPER_ADMIN', NULL, '2020-09-06 15:40:09.000', '2020-09-06 15:40:11.000', 0, 0, null, null);
INSERT INTO `uac_account` VALUES (1302601215588966402, '18384775914', '$2a$10$svCLt8f2BLtwkZA.e3q6/OvjjYcikqUCCyvF0bhbuve3EdOlrgyby', '管理员1', 1, 'ADMIN', NULL, '2020-09-06 08:35:05.618', '2020-09-06 08:35:05.621', 0, 0, 100, '288口岸');
INSERT INTO `uac_account` VALUES (1302603974434476034, '18384775915', '$2a$10$svCLt8f2BLtwkZA.e3q6/OvjjYcikqUCCyvF0bhbuve3EdOlrgyby', '普通用户', 1, 'CUSTOMER', '18384775915@163.com', '2020-09-06 21:46:03.379', '2020-09-06 21:46:03.381', 0, 1, 100, '288口岸');
COMMIT;

-- ----------------------------
-- Table structure for uac_permission
-- ----------------------------
DROP TABLE IF EXISTS `uac_permission`;
CREATE TABLE `uac_permission` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键Id',
  `type` varchar(32) NOT NULL COMMENT '权限类型 MENU or BUTTON',
  `level` int(2) NOT NULL COMMENT '级别 仅用于菜单 1、2、3代表一二三级菜单',
  `menu_name` varchar(20) NOT NULL COMMENT '权限名字',
  `parent_id` bigint(20) DEFAULT NULL COMMENT '上级权限id',
  `description` varchar(63) DEFAULT NULL COMMENT '描述',
  `permit` varchar(32) DEFAULT NULL COMMENT '按钮权限标志 菜单可为空',
  `front_url` varchar(255) DEFAULT NULL COMMENT '前端路由',
  `icon_url` varchar(255) DEFAULT NULL COMMENT '图标url',
  `create_time` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
  `update_time` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `tenant_id` bigint(20) NULL COMMENT '租户id',
  `tenant_name` varchar(64) NULL COMMENT '租户名字',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=588898 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='权限表';

-- ----------------------------
-- Records of uac_permission
-- ----------------------------
BEGIN;
INSERT INTO `uac_permission` VALUES (40000, 'MENU', 1, '管理员管理', 0, '管理员管理', null, '/admin/manage', 'iconfont icon-yonghuguanli', '2020-09-06 23:37:16.000', '2020-09-06 23:37:18.000', 0, null, null);
INSERT INTO `uac_permission` VALUES (588878, 'MENU', 1, '用户管理', 0, '用户管理', null, '/article', 'iconfont icon-navicon-wzgl', '2020-09-10 20:50:18.000', '2020-09-10 20:50:20.000', 0, 100, '288口岸');
INSERT INTO `uac_permission` VALUES (588879, 'MENU', 1, '菜单管理', 0, '菜单管理', null, '/billManagement', 'iconfont icon-zhangdanguanli', '2020-09-10 20:50:23.000', '2020-09-10 20:50:24.000', 0, 100, '288口岸');
INSERT INTO `uac_permission` VALUES (588880, 'MENU', 1, '角色管理', 0, '角色管理', null, '/certificationManagement', 'iconfont icon-renzhengguanli', '2020-09-10 20:50:27.000', '2020-09-10 20:50:28.000', 0, 100, '288口岸');
INSERT INTO `uac_permission` VALUES (588881, 'MENU', 1, '角色权限', 0, '角色权限', null, '/fundOverview', 'iconfont icon-zijinguanli', '2020-09-10 20:50:31.000', '2020-09-10 20:50:33.000', 0, 100, '288口岸');
INSERT INTO `uac_permission` VALUES (588882, 'MENU', 1, '字典表管理', 0, '字典表管理', null, '/imConsulting', 'iconfont icon-IMliaotian', '2020-09-10 20:50:35.000', '2020-09-10 20:50:37.000', 0, 100, '288口岸');
COMMIT;

-- ----------------------------
-- Table structure for uac_role
-- ----------------------------
DROP TABLE IF EXISTS `uac_role`;
CREATE TABLE `uac_role` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `role_name` varchar(63) NOT NULL COMMENT '角色名字',
  `role_code` varchar(63) NOT NULL COMMENT '角色编码',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  `enable` tinyint(255) NOT NULL DEFAULT '1' COMMENT '是否禁用',
  `create_time` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
  `update_time` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `tenant_id` bigint(20) NULL COMMENT '租户id',
  `tenant_name` varchar(64) NULL COMMENT '租户名字',
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_index_role_code` (`role_code`, `tenant_id`) USING BTREE COMMENT 'code必须唯一'
) ENGINE=InnoDB AUTO_INCREMENT=10003 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of uac_role
-- ----------------------------
BEGIN;
INSERT INTO `uac_role` VALUES (10000, '超级管理员', 'SUPER_ADMIN', '超级管理员角色', 1, '2020-09-06 21:36:44.000', '2020-09-06 21:36:46.000', 0, null, null);
INSERT INTO `uac_role` VALUES (10001, '管理员', 'ADMIN', '管理员角色', 1, '2020-09-06 21:36:44.000', '2020-09-06 21:36:46.000', 0, 100, '288口岸');
INSERT INTO `uac_role` VALUES (10002, '普通用户', 'CUSTOMER', '普通用户', 1, '2020-09-06 21:37:45.000', '2020-09-06 21:37:47.000', 0, 100, '288口岸');
COMMIT;

-- ----------------------------
-- Table structure for uac_role_permission
-- ----------------------------
DROP TABLE IF EXISTS `uac_role_permission`;
CREATE TABLE `uac_role_permission` (
  `role_id` bigint(20) NOT NULL COMMENT '角色id',
  `menu_id` bigint(20) NOT NULL COMMENT '菜单id',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`role_id`,`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of uac_role_permission
-- ----------------------------
BEGIN;
INSERT INTO `uac_role_permission` VALUES (10000, 'SUPER_ADMIN', 0);
INSERT INTO `uac_role_permission` VALUES (10001, 'ADMIN', 0);
INSERT INTO `uac_role_permission` VALUES (10001, 'ADMIN', 0);
INSERT INTO `uac_role_permission` VALUES (10001, 'ADMIN', 0);
INSERT INTO `uac_role_permission` VALUES (10001, 'ADMIN', 0);
INSERT INTO `uac_role_permission` VALUES (10001, 'ADMIN', 0);
COMMIT;


-- ----------------------------
-- Table structure for uac_tenant
-- ----------------------------
DROP TABLE IF EXISTS `uac_tenant`;
CREATE TABLE `uac_tenant` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `name` varchar(64) DEFAULT NULL COMMENT '租户名字',
  `description` varchar(255) DEFAULT NULL COMMENT '租户描述',
  `create_time` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
  `update_time` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) COMMENT '更新时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10003 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='租户表';


-- ----------------------------
-- Records of uac_tenant
-- ----------------------------
insert into `uac_tenant`(id, `name`, `description`)
values(100, '288口岸', '288口岸');

SET FOREIGN_KEY_CHECKS = 1;
